package com.example.pay.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("payment_transaction")
public class PaymentTransaction {
    @TableId(type = IdType.AUTO)
    private Long id;

    private String orderCode;
    private Integer channel; // 1-微信 2-支付宝
    private BigDecimal amount;
    private String currency = "CNY";
    private Integer status = 0; // 0-待支付 1-成功 2-失败 3-退款
    private String transactionId; // 三方交易号
    private String requestPayload;
    private String responsePayload;
    private String notifyPayload;
    private LocalDateTime createTime = LocalDateTime.now();
    private LocalDateTime updateTime = LocalDateTime.now();
}